// Copyright 2010 Alexandre Tristan St-Cyr <tristan.stcyr@gmail.com>

package com.codeplex.loadjava.model;

public class MethodInvocation {
	
	private Method caller;
	
	private Method callee;
	
	public MethodInvocation(Method caller, Method callee) {
		this.caller = caller;
		this.callee = callee;
	}
	
	public Method getCaller()
	{
		return this.caller;
	}
	
	public Method getCallee()
	{
		return this.callee;
	}
	
	@Override
	public boolean equals(Object o)
	{
		if (!this.getClass().isInstance(o)) {
			return false;
		}
		MethodInvocation other = (MethodInvocation)o;
		return this.caller.equals(other.caller)
			&& this.callee.equals(other.callee);
	}
	
	@Override
	public String toString()
	{
		return "caller:"+caller+", "+" callee:"+callee;
	}
}
